# -*- coding:utf-8 -*-
"""
Author：Administrator
Date:2023年03月19日
"""
import openpyxl

myBook = openpyxl.load_workbook('员工表.xlsx')
mySheet=myBook.active

myValues=list(mySheet.values)
myNewBook=openpyxl.Workbook()
myNewSheet=myNewBook.active
myNewSheet.title='员工表'
myNewSheet.append(['工号','部门','姓名','最高学历','专业','出生年份','出生月份','出生日期'])
for myRow in myValues[1:]:
	myList=[]
	myList+=myRow[0:5]
	myDate=myRow[5]
	myYearPos=myDate.find('年')
	myYear=myDate[0:myYearPos+1]
	myMonthPos = myDate.find('月')
	myMonth = myDate[myYearPos+1:myMonthPos + 1]
	myDay=myDate[myMonthPos+1:]
	myList+=[myYear,myMonth,myDay]
	myNewSheet.append(myList)

myNewBook.save('结果表-员工表.xlsx')
